<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>TestHTML</title>
<script type="text/javascript" src="./SComet-note.js"></script>
<style type="text/css">
#center {
	position: absolute;
	width: 400px;
	height: 400px;
	left: 50%;
	top: 30px;
	margin-left: -200px;
}

#show {
	position: absolute;
	width: 400px;
	height: 300px;
}

#text {
	position: absolute;
	width: 290px;
	top: 320px;
}

#button {
	position: absolute;
	width: 100px;
	top: 320px;
	left: 305px;
}
</style>
</head>
<body onunload="conns.close()">
	<div id="center">
		<textarea id="show"></textarea>
		<br /> <input id="text" type="text" /> <input id="button"
			value="click me" type="button" onclick="button_click()" />
	</div>
	<script type="text/javascript">
		var conns = SComet.getSComet();

		var show = document.getElementById("show");

		conns.callBack = function(message) {
			show.innerHTML += message;
		};

		conns.link();

		var text = document.getElementById("text");

		var button_click = function() {
			conns.send(text.value);
		};
	</script>

</body>
</html>
